package ${genEntityPublicConfig.packageInfo};

<#list importSet as temp>
import ${temp};
</#list>

/**
 * <#if tableInfo.databaseName??>数据库: ${tableInfo.databaseName}</#if>
 * 表名: ${tableInfo.tableName}
 * <#if tableInfo.tableComment??>表备注: ${tableInfo.tableComment}</#if>
<#--展示忽略的列的信息-->
 * <#if ignoreColumns??>忽略的列: <#list ignoreColumns as ignoreColumn>${ignoreColumn}<#if ignoreColumn_has_next>,</#if></#list></#if>
 * @author <#if authorInfo??>${authorInfo.authorName}</#if>
 * @data <#if authorInfo??>${authorInfo.createDate?string("yyyy-MM-dd")}</#if>
 */
<#if genEntityPublicConfig.withMybatisAnnotation == true>
@TableName(value = "${tableName?upper_case}")
@Alias(value = "${entityName}")
</#if>
<#if genEntityPublicConfig.withLombokAnnotation == true>
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
</#if>
<#if genEntityPublicConfig.withSwaggerAnnotation == true>
@ApiModel(value = "${tableName?upper_case}", description = "${tableInfo.tableComment}")
</#if>
public class ${entityName} implements Serializable {

    /**
     * 自动生成的序列化id
     */
    private static final long serialVersionUID = ${serialVersionUID?c}L;
<#list columnEntityList as columnTemp>

    /**
     * - 数据库字段备注: <#if columnTemp.columnComment??>${columnTemp.columnComment}</#if>
     * - 对应数据库类型: ${columnTemp.columnType}
     */
    <#if genEntityPublicConfig.withMybatisAnnotation == true>
        <#if columnTemp.columnKey??>
            <#if columnTemp.columnKey == 'PRI'>
    @TableId(value = "${columnTemp.columnName?upper_case}", type = IdType.AUTO)
            <#else>
    @TableField(value = "${columnTemp.columnName?upper_case}")
            </#if>
        <#else>
    @TableField(value = "${columnTemp.columnName?upper_case}")
        </#if>
    </#if>
    <#if columnTemp.javaTypeName == 'Date' && genEntityPublicConfig.dateFieldWithJacksonAnnotation == true>
    @JsonFormat(pattern = "${genEntityPublicConfig.datePattern}", timezone = "GMT+8")
    </#if>
    <#if columnTemp.javaTypeName == 'Date' && genEntityPublicConfig.dateFieldWithSpringAnnotation == true>
    @DateTimeFormat(pattern = "${genEntityPublicConfig.datePattern}")
    </#if>
    <#if genEntityPublicConfig.withSwaggerAnnotation == true>
    @ApiModelProperty(value = "<#if columnTemp.columnComment??>${columnTemp.columnComment}</#if>")
    </#if>
    <#if genEntityOfJeecgbootConfig??>
        <#if genEntityOfJeecgbootConfig.withExcelAnnotation == true>
    @Excel(name = "<#if columnTemp.columnComment??>${columnTemp.columnComment}</#if>", width = <#if genEntityOfJeecgbootConfig.excelAnnotationDefaultLength??>${genEntityOfJeecgbootConfig.excelAnnotationDefaultLength}</#if>)
        </#if>
    </#if>
    private ${columnTemp.javaTypeName} ${columnTemp.javaFiledName};
</#list>

<#if genEntityPublicConfig.withLombokAnnotation != true>
    <#list columnEntityList as columnTemp>
    public ${columnTemp.javaTypeName} get${columnTemp.javaFiledName?cap_first}() {
        return this.${columnTemp.javaFiledName};
    }

    public void set${columnTemp.javaFiledName?cap_first}(${columnTemp.javaTypeName} ${columnTemp.javaFiledName}) {
        this.${columnTemp.javaFiledName} = ${columnTemp.javaFiledName};
    }

    </#list>
</#if>
}